<template>
	<!-- 审核拒绝 -->
	<view class="page">
		<view class="img_box">
			<image <image :src="$util.img('upload/uniapp/community/fail.png')" mode="widthFix"></image>
			<text class="errText">审核拒绝</text>
			<text class="detail">
				拒绝理由：{{err_detail}}
			</text>

		</view>
		<button type="primary" size="default" class="waiting-btn" @click="submit_again">重新申请</button>
		<!-- <button type="primary" size="default" @click="back">返回</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				err_detail: '',
				formData: {}
			}
		},
		onLoad() {
			this.getcommunityInfo()
		},
		methods: {
			back() {
				this.$util.redirectTo('/pages/member/index/index')
			},
			submit_again() {
				console.log('aaaaaaaaaaaaaaaaaaa')
				// uni.setStorageSync('community_apply', {
				// 	name: this.formData.name,
				// 	mobile: this.formData.mobile,
				// 	wechat: this.formData.wechat,
				// 	img: this.formData.community_img,
				// 	store_name: this.formData.community,
				// 	lat: this.formData.latitude,
				// 	log: this.formData.longitude,
				// 	address: this.formData.address,
				// 	address2: this.formData.full_address,
				// 	city_id: this.formData.city_id,
				// 	district_id: this.formData.district_id,
				// 	province_id: this.formData.province_id
				// });
				this.$util.redirectTo('/otherpages/community/community_apply', {
					type:1,
					name: this.formData.name,
					mobile: this.formData.mobile,
					wechat: this.formData.wechat,
					img: this.formData.community_img,
					store_name: this.formData.community,
					lat: this.formData.latitude,
					log: this.formData.longitude,
					address: this.formData.address,
					address2: this.formData.full_address,
					city_id: this.formData.city_id,
					district_id: this.formData.district_id,
					province_id: this.formData.province_id
				})
			},
			getcommunityInfo() {
				this.$api.sendRequest({
					url: '/api/community/getLeaderDetail',
					success: res => {
						this.formData = res.data
						this.err_detail = res.data.refuse_reason
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	.page {
		height: 100vh;
		background-color: #F8F8F8;

		.img_box {
			height: 60vh;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;

			image {
				width: 200rpx;
				height: 200rpx;
				margin-bottom: 70rpx;
			}

			text {
				// color: $color-title;
				// font-size: $font-size-base;
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #303133;

			}

			.contain {}

			.detail {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #303133;
				padding: 0 120rpx;
				margin-top: 29rpx;
				text-align: center;


			}

			.details {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #303133;
				text-align: center;
			}
		}

		button {
			margin: 0 auto;
			height: 80rpx;
			line-height: 80rpx;
			font-size: 32rpx;
			letter-spacing: 2rpx;
			width: 500rpx;
		}

		.waiting-btn {
			margin-top: 180rpx;
		}
	}
</style>
